package com.jwsoft.manager.core.gateway.controller;

import com.bifang.engine.assistant.core.domain.AppResponse;
import com.jwsoft.manager.common.vo.eduAddressTree.ElasticHealthVO;
import com.jwsoft.manager.core.dao.service.AddressMessageService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * es相关接口
 *
 * @author fangs
 */
@RestController
@RequestMapping(value = "/doc/api")
@Tag(name = "es相关接口", description = "es相关接口")
public class ElasticsearchController {
    @Autowired
    AddressMessageService addressMessageService;

    @GetMapping("/es0001")
    public AppResponse<ElasticHealthVO> checkHealth() {
        return AppResponse.successData(addressMessageService.checkElasticsearch());
    }
}
